﻿using SqlSugar;
using System.Collections.Generic;

namespace Qy.Scenario;

[SugarTable(DbTableName.QyMenu)]
public class Menu
{
    [SugarColumn(IsPrimaryKey = true)]
    public int Id { get; set; }
    public int Pid { get; set; }
    public int Sort { get; set; }
    public int Type { get; set; }
    public string Name { get; set; }
    public string PathUrl { get; set; }
    public string ComUrl { get; set; }
    public string RoleCode { get; set; }
    public string Icon { get; set; }
    public bool Status { get; set; }
    public string Redirect { get; set; }
    public bool Hide { get; set; }
}


public class ViewMenu
{
    public int Id { get; set; }
    public int Pid { get; set; }
    public int Type { get; set; }
    public string Title { get; set; }
    public int Sort { get; set; }
    public string PathUrl { get; set; }
    public string ComUrl { get; set; }
    public string RoleCode { get; set; }
    public string Icon { get; set; }
    public bool Status { get; set; }
    public int Depth { get; set; }
    public string Spread { get; set; }
    public string Disabled { get; set; }
    public int ChildrenCount { get; set; }
    public bool HaveChild { get; set; }
    public string Redirect { get; set; }
    public bool Hide { get; set; }
    public List<ViewMenu> Children { set; get; } = new();
}

public class AsMenu
{
    public int MenuId { get; set; }
    public string Id { get; set; }
    public string Icon { get; set; }
    public string Title { get; set; }
    public int Type { get; set; }
    public string ComUrl { get; set; }
    public int Value { get; set; }
    public string RoleCode { get; set; }
    public int Sort { get; set; }
    public string Redirect { get; set; }
    public bool Hide { get; set; }
    public List<AsMenu> Children { set; get; } = new();
}
